//
//  APIUseDemo.swift
//  CooperSwift_Example
//
//  Created by 计海峰 on 2021/11/5.
//  Copyright © 2021 CocoaPods. All rights reserved.
//

import Foundation
import RxSwift

struct APIUseDemo {
    
    static func formDataTest(_ bag: DisposeBag) {
        TjbShopOneProvider.rx.request(.mobSpuGetspudetail(66)).mapJSON().asObservable().mapHandyResultModel(type: ResultModel.self, toast: .all, tag: "xxx").asObservable().mapHandyModel(type: MobSpuGetspudetailModel.self).subscribe(onNext: {
                $0.apply{ appData in
                    print(appData.name!)
                }
            }).disposed(by: bag)
    }
    
    static func bodyDataTest(_ bag: DisposeBag) {
        BuyChatShopApiProvider.rx.request(.collectCollect)
    }
    
}
